
package cn.hz.horse.ext;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
 

import cn.hz.horse.EzHandle;
import cn.hz.horse.EzResHandle;

public class MyBatchResHandle extends EzResHandle  {
 
	
	public boolean handleSucc(Object obj){
	   
		//System.out.println("succc  "+obj);
		BatCnter bt=(BatCnter)obj;
		List<Map<String,Object>>  es=bt.getEs();
		String ids="";
		for( Map<String,Object> e:es){
			if(!ids.equals("")){
				ids=ids+",";
			}
			ids=ids+e.get("id");
		}
		//System.out.println("xxxx");
		MySQLClient.updateBooks(ids);
		return true;
	}
	
	public boolean handleFail(Object obj){
		   
		System.out.println("XXXXXX  "+obj);
		HashMap<String,Object> map=(HashMap<String,Object>)obj;
	 
		return true;
	}
	
	public boolean handleList(List<Object> list){
		System.out.print("XXXXXX");
		qu.addAll(list);
		return true;
	}
}
